Page({
    data: {
        x: []
    },
    tap() {

        let _that = this
        for (let i = 0; i < 10; i++) {

            setTimeout(function() {
                _that.data.x.push(i)

                if (_that.xTimer) {
                    clearTimeout(_that.xTimer)
                }

                _that.xTimer = setTimeout(function() {
                    console.log(_that.data.x);

                }, 400);

            }, 5)
        }

        setTimeout(function() {
            console.log('执行了');

        }, 1)
    }
})